<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%   
String path = request.getContextPath();   
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";   
%> 
<div id="top-affix">
 	<div class="layout-c">
 		<c:if test="${sessionScope.isLogin==null or sessionScope.isLogin==false }">
		 	<ul class="inline">
		 		<li class="first last"><a href="index.html"><i class="icon-home icon-white"></i>首页</a></li>
		 		<li class="fr last"><a href="user/login.html">登陆</a></li>
		 		<li class="fr first"><a href="user/register.html">注册</a></li>
		 	</ul>
	 	</c:if>
	 	<c:if test="${sessionScope.isLogin==true }">
		 	<ul class="inline">
		 		<li class="first last"><a href="index.html"><i class="icon-home icon-white"></i>首页</a></li>
		 		<li class="fr last"><a href="user/logout.html"><i class="icon-off icon-white"></i>退出</a></li>
		 		<li class="fr"><a href="user/info.html"><i class="icon-cog icon-white"></i>设置</a></li>
		 		<li class="fr">
		 			
		 			<a href="u/home.html">
		 				${sessionScope.user.name}
		 			</a>
			 		<a href="u/home.html">
		 				<c:if test="${sessionScope.user.headImg==null or sessionScope.user.headImg=='' }">
		 					<img style="border:1px solid #333" src="upload/head/default.jpg?s=24"/>
		 				</c:if>
		 				<c:if test="${sessionScope.user.headImg!=null and sessionScope.user.headImg!='' }">
		 					<img style="border:1px solid #333" src="upload/head/${sessionScope.user.headImg }?s=24"/>
		 				</c:if>
		 			</a>
		 			
		 		</li>
		 		<li class="first fr"><a href="u/question.html">新问题(<b style="color:#FFF">${sessionScope.user.questionsNum }</b>)</a></li>
		 	</ul>
	 	</c:if>
	 	
 	</div>
 </div>